import java.util.Arrays;
import java.util.Scanner;

public class FifthQuestion {
    public static void main(String[] args) {
        Scanner input =new Scanner(System.in) ;
        String fruits[] = new String[5];
        for (int i = 0; i < 5; i++) {
            System.out.print("请输入"+(i+1)+"个水果的英文名字:");
            fruits[i]=input.next();
        }

        System.out.println("这些水果的英文名字在字典中出现的顺序是：");
        Arrays.sort(fruits);
        System.out.println(Arrays.toString(fruits));
    }
}
